package view.test;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.Point;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class Palette extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3172748503169078929L;
	private static final Dimension MIN_SIZE = new Dimension(192, 192);
	private static final Point LOCATION = new Point(608, 8);
	
	private int numItemBanks = 4; // get this from the model
	
	public Palette() {
		this.setMinimumSize(MIN_SIZE);
		this.setSize(MIN_SIZE);
		this.setLayout(new GridLayout(2, 2));
		this.setLocation(LOCATION);
		this.setBackground(Color.WHITE);
		this.setVisible(true);
		
		fillPalette();
		
	}
	
	private void fillPalette() {
		for (int i = 0; i < numItemBanks; i++) {
			JLabel label = new JLabel();
			label.setBackground(Color.LIGHT_GRAY);
			label.setOpaque(true);
			label.setBorder(BorderFactory.createLoweredBevelBorder());
			this.add(label);
		}
	}

}
